package com.example.administrator.androidui7;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class Activity02 extends AppCompatActivity {
Button mBtn2;
EditText mEtAmount;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_02);
mBtn2= findViewById(R.id.btn_button2);
mEtAmount = findViewById(R.id.et_amount);

mBtn2.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {

        String amount = mEtAmount.getText().toString();
        Intent intent = new Intent();
        intent.putExtra("date",amount);
        setResult(1002,intent);
        finish();
    }
});

    }

    }

